To use this command, drop the "dec" file into your nShell "bin" directory.
Description
===========
NAME
dec - Decrement a variable
SYNOPSIS
dec variable [offset]
DESCRIPTION
This command will subtract an offset from a numeric variable:
variable = variable - offset
RETURN CODES
<0 Error
0 The result of the decrement is greater than zero.
1 The result of the decrement is less than or equal to zero.
Note
====
In normal usage, the variable name should not have a leading '$'. Remember that "$name" forces an immediate interpretation, so that given:
set foo 5
set bar foo
The command "dec foo" would decrement the value of "foo" to 4. The command "dec $bar" would accomplish the same thing, by first interpreting "$bar" to mean "foo" and then decrementing the contents of "foo".